Skip to content

Improve cloudflare IP list fetching#293

Merged
hhvrc merged 6 commits intodevelopfrom
feature/better-cloudflare-ips-prefetch
Apr 24, 2026
Merged

Improve cloudflare IP list fetching#293
hhvrc merged 6 commits intodevelopfrom
feature/better-cloudflare-ips-prefetch

Conversation

@hhvrc
Copy link
Copy Markdown
Contributor

@hhvrc hhvrc commented Apr 24, 2026

No description provided.

@hhvrc hhvrc self-assigned this Apr 24, 2026
Copilot AI review requested due to automatic review settings April 24, 2026 16:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves the Cloudflare trusted proxy IP list from an embedded text resource to a committed, auto-generated C# source file, and updates the scheduled GitHub workflow to regenerate that source monthly.

Changes:

  • Replace embedded cloudflare-ips.txt fallback with a compiled CloudflareNetworks list in a generated .g.cs partial.
  • Add an opt-in MSBuild target (-p:UpdateCloudflareIPs=true) to download Cloudflare IPs and regenerate CloudflareNetworks.g.cs.
  • Update the monthly workflow to run the MSBuild regeneration and commit the regenerated source file.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Common/cloudflare-ips.txt Removes the previously embedded Cloudflare IP list file.
Common/Utils/TrustedProxiesFetcher.cs Switches fallback from embedded resource loading to CloudflareNetworks and makes the class partial.
Common/Utils/CloudflareNetworks.g.cs Adds committed generated source containing the Cloudflare CIDR list as IPNetwork.Parse(...) calls.
Common/Common.csproj Adds opt-in MSBuild download + source generation pipeline for Cloudflare networks.
.github/workflows/update-cloudflare-proxies.yml Changes the monthly update job to regenerate and commit CloudflareNetworks.g.cs via dotnet build with the MSBuild property.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Common/Common.csproj Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hhvrc hhvrc merged commit 1688cc7 into develop Apr 24, 2026
20 of 22 checks passed
@hhvrc hhvrc deleted the feature/better-cloudflare-ips-prefetch branch April 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants